package com.briup.day09;

/**
 * @author lining
 * @date 2024/1/18 17:19
 */
public class TestTeacher {
    public static void main(String[] args) {
        Teacher t = new Teacher("jack", "昆山", 3500.0);
        Teacher t2 = new Teacher("jack", "昆山", 3500.0);
        System.out.println(t.equals(t2));
        //自动拆箱
        double salary = t.getSalary();
        System.out.println(t.hashCode());
        System.out.println(t2.hashCode());
        // t t2 hashcode值相同，但不指向一个对象
        Teacher t3 = t;//  t t3 hashcode值相同指向的是一个对象
        System.out.println(t3.hashCode());
        Teacher t4 = new Teacher("tom","昆山",1000.0);
        System.out.println(t4.hashCode());
    }
}
